<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/common/header.jsp"%>
<html>
<head>
  <script type="text/javascript">
  /*新增*/
  function addNotice(url){
	  commonDetail(url,"save","noticeTableId");
  }
 /* 修改*/
  function modifyNotice(url){
   	  commonDetail(url,"update","noticeTableId");
  }
  /* 发布*/
  function NoticepublishSt1(url){
	  publish(url, "确定要发布吗");
  }
  /* 取消发布*/
  function NoticepublishSt0(url){
	  publish(url, "确定要取消发布吗");
  }
  var grid;
  $(document).ready(function() {
	  grid = $("#noticeTableId").jpgrid({
		url: "noticeListJson.do",
		columns: [
			{title: "标题", field: "MESSAGE_TITLE",width:100},
            {title: "所属机构", field: "INST_NAME",width:150},
            {title: "发布状态", field: "PUBLISH_ST",width:100}
		]
	});
  });
  
  function doSearch() {
	grid.load({
        message_title: $('#message_title').val(),
        publish_st: $('#publish_st').val(),
        ins_cn_nm: $('#ins_cn_nm').val()
	});
  }
  
  function publish(url, msg){
	  commonAsync(url, "noticeTableId", msg, function(result){
		  grid.reload();
	  });
  }
  </script>
</head>
<body class="easyui-layout list_body"  >
	<form id="noticeForm" name="noticeForm">
		<div class="list_body_north" data-options="region:'north'"  border="false" >
			<!-- 查询表单 -->
			<div  class="datagrid-toolbar" border="false"  >
				<span>标题:</span>
				<input id="message_title" type="text" name="message_title"  class="easyui-textbox"  >
				<span>发布状态:</span>
				<code:codeSelect id="publish_st" name="publish_st"  code_type="publish_st" showSelect="true" selectId="${appMessageInfEntity.publish_st}"></code:codeSelect>
				<span>机构名称:</span>
				<input id="ins_cn_nm" type="text" name="ins_cn_nm"  class="easyui-textbox"  >
				<a href="#" class="easyui-linkbutton btn" iconCls="icon-search" onclick="doSearch() ">查询</a> 
				<a href="#" class="easyui-linkbutton btn" iconCls="icon-reload" onclick="resetForm() ">重置</a>					
			</div>
			<!-- 自定义标签工具栏 -->
			<jiepos:buttonOperateTag menuCode="${menuCode}"></jiepos:buttonOperateTag>	
		</div>
		<div data-options="region:'center'" border="false"  class="list_body_center">		
			<!-- 表格 -->
			<table id="noticeTableId" fit="true"></table>
		</div>
	</form>
</body>
</html>
